/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package views;


import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;

/**
 *
 * @author Emmanouil Samatas
 */
public class PlayerMapBar extends JPanel {
    public JLabel playerName = new JLabel("hi");
    public JProgressBar playerHP = new JProgressBar();
    public JProgressBar playerMP = new JProgressBar();
    public JProgressBar playerXP = new JProgressBar();
    public JLabel playerDamage = new JLabel();
    public JLabel playerDefence = new JLabel();
    
    public PlayerMapBar(){
        this.setLayout(new GridLayout(1,2,20,0));
        this.setBackground(Color.BLACK);
        GridLayout sidePanelsLayout = new GridLayout(4,1,0,5);
        JPanel leftPanel = new JPanel();
        
        playerName.setForeground(Color.WHITE);
        playerDamage.setForeground(Color.RED);
        playerDefence.setForeground(Color.yellow);
        leftPanel.setLayout(sidePanelsLayout);
        leftPanel.setBackground(Color.BLACK);
        
        JPanel rightPanel = new JPanel();
        rightPanel.setLayout(sidePanelsLayout);
        rightPanel.setBackground(Color.BLACK);
        
        playerHP.setStringPainted(true);
        playerHP.setForeground(Color.RED);
        
        playerMP.setStringPainted(true);
        playerMP.setForeground(Color.BLUE);
        
        playerXP.setStringPainted(true);
        playerXP.setForeground(Color.CYAN);
        
        leftPanel.add(playerName);
        leftPanel.add(playerHP);
        leftPanel.add(playerMP);
        leftPanel.add(playerXP);
        
        rightPanel.add(playerDamage);
        rightPanel.add(playerDefence);
        add(leftPanel);
        add(rightPanel);
        
    }
    
    
    
    public static void main(String[] args){
        JFrame frame = new JFrame();
        frame.setVisible(true);
        frame.setSize(700,100);
        frame.add(new PlayerMapBar());
    }
    
   
}
